package com.example.springbootshiro.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.springbootshiro.pojo.RolePerms;
import com.example.springbootshiro.mapper.RolePermsMapper;
import com.example.springbootshiro.service.IRolePermsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gqz
 * @since 2021-09-03
 */
@Service
public class RolePermsServiceImpl extends ServiceImpl<RolePermsMapper, RolePerms> implements IRolePermsService {

    @Autowired
    private RolePermsMapper rolePermsMapper;

    @Override
    public List<RolePerms> findPermsByRoleId(Long id) {
        return rolePermsMapper.selectList(new QueryWrapper<RolePerms>().eq("role_id",id));
    }
}
